package com.bjesc_b2c.app.appraiset.mvp.presenter.impl;

import android.content.Context;

import com.bjesc_b2c.app.appraiset.mvp.model.GetCarForModel;
import com.bjesc_b2c.app.appraiset.mvp.model.impl.GetCarForModelImpl;
import com.bjesc_b2c.app.appraiset.mvp.presenter.GetCarForPresenter;
import com.bjesc_b2c.app.appraiset.mvp.view.CarForView;
import com.orhanobut.logger.Logger;

import java.util.List;

import master_bean.CarForBean;

/**
 * Created by lenovo on 2017/4/22.
 */

public class GetCarForPresenterImpl implements GetCarForPresenter ,GetCarForModelImpl.CallBack{
    private CarForView view;
    private GetCarForModel getCarForModel;
    private Context contex;
    public GetCarForPresenterImpl(Context context ,CarForView view){
        this.view = view;
        this.contex = context;
        getCarForModel = new GetCarForModelImpl(this);
    }
    @Override
    public void getCarFor(String marketID) {
        Logger.d("getCarFor");
        getCarForModel.requestCarFor(contex,marketID);
    }

    @Override
    public void callback(List<CarForBean> listbean) {
        view.getCarForDealer(listbean);

    }
}
